Repository navigation
feat(tier1): move the skill-name length rule into the quality config - #944
westonplatter wants to merge 5 commits into
Conversation
chrisknvidia
left a comment
There was a problem hiding this comment.
Thanks, this is a clean next step after #885 and it does exactly what the title says. I checked the default against main by scoring every SKILL.md in the repo and its fixtures, plus a set of skills with one- to six-character folder names, on both trees: scores, dimension scores, severities, messages and finding ids are identical, including the two ids the tests pin. The loader change is a single table row, so min_chars gets the same validation and sparse-overlay path as the neighbouring rules, and an existing custom file without the new block keeps the packaged values.
Tests: the two touched suites plus test_quality_score_languages pass at head (662) with the same empty failure set as main (648). Running the new tests against main's source, the twelve that depend on the new key fail and the three behaviour-preservation tests pass, which is the right shape. ruff check is clean on the changed files.
The only thing to do before merge is a rebase: CHANGELOG.md conflicts with main because both sides added a bullet at the top of Unreleased / Added, so it is a one-line mechanical fix. The CI runs for this head are waiting for maintainer approval and have not executed yet.
A second pass over the config edge cases: null, string, negative, float, boolean and over-limit values for min_chars are rejected, points: 0 disables the rule, and a custom file that omits the key falls back to the packaged default. Reverting the YAML or the loader alone fails all fifteen new tests; reverting the validator alone fails exactly the three custom-config ones, with the pinned finding ids passing on both trees as they should.
rng1995
left a comment
There was a problem hiding this comment.
[SkillEvaluator Review]
Thanks @westonplatter for this contribution.
Value and readiness: This is a focused step on #329. Users can tune or disable the skill folder-name deduction, and the packaged rule preserves its default behavior. One documentation correction remains before final review by the maintainers and PIC.
Material findings: 1 P3 in docs/tier1-reference.mdx:696.
PIC tradeoffs: None.
Verification and gaps: Ran the quality config, quality score, and language suites on the current tree (662 passed). Against current main, 11 of 14 selected new cases fail as expected and the three compatibility cases pass. Compared scores and finding IDs across seven folder names with both packaged and existing sparse config. Confirmed the existing config digest stays stable, the packaged digest changes, and an invalid minimum exits 2 with the field name. Repository lint and the OSS boundary scan passed. Fern reported zero errors and one warning. The two contributor commits are signed off. The new head's CI is pending. Local verification was on macOS with Python 3.14.
Reviewed head: 10d1dd85ba0c0ea06dd88ac9aa73a84d55fe8937
…nfig Move the discoverability name_too_short rule (10 pts, warning) into quality-default.yaml with points, message, suggestion and min_chars. points 0 turns it off. The packaged text equals the former literals and the folder name is still appended in single quotes, so scores, severities and finding_ids are unchanged; tests pin two ids recorded before the change. Only the packaged quality_config digest changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Weston Platter <westonplatter@gmail.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Weston Platter <westonplatter@gmail.com>
10d1dd8 to
f2d9f8f
Compare
|
Thanks @rng1995 and @chrisknvidia. I addressed the P3 review finding and rebased to resolve the merge conflict. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Weston Platter <westonplatter@gmail.com>
rng1995
left a comment
There was a problem hiding this comment.
[SkillEvaluator Review]
Thanks @westonplatter for this contribution.
Value and readiness: Real value, a focused step on #329: users can tune or turn off the skill folder-name length deduction through discoverability.name_too_short, and the packaged rule keeps today's behavior. Verified at this head: scores, severities, messages and finding_ids match main across seven folder names with the packaged config and with an existing sparse custom config; the packaged quality_config digest changes once and a custom file keeps its digest; lowering min_chars or points: 0 drops the finding end to end through quality-check; min_chars of 0 or above 1,000,000,000, a blank message and a NaN points all exit 2 and name the field. The 15 new tests: 12 fail against main's source and the 3 behavior-preservation cases pass. Not ready yet: two P3s below, and CI has not run on this head (see below).
Prior findings: 1 of 1 fixed. docs/tier1-reference.mdx now describes the separate folder-name convention check accurately (lowercase first letter, then lowercase letters, digits, hyphens or underscores), which matches quality_score.py:826. That thread is already resolved. No other thread is open.
Material findings: 2 new, both P3 (inline): CHANGELOG.md:19 the bullet sits in the released ## 1.3.0 section, and the Quality config overview in docs/tier1-reference.mdx does not mention the new rule.
PIC tradeoffs: none.
Verification and gaps: Read the full diff. Ran the PR's three test files plus neighbours on this head (662 and 1,236 passed), and on a local merge of the current main (916 passed); ruff check . and scripts/check_oss_boundary.py are clean on both; fern check reported 0 errors. The merge with current main is clean except that the CHANGELOG bullet lands in the wrong section. The diff touches nothing under .github/, scripts, conftest.py, pyproject or the Makefile, so I approved the fork workflow runs for this head; they have no result yet, and I cannot approve until they are green. Not verified: Gitleaks (not run locally), Python 3.12 and 3.13, Windows, and the full suite.
Reviewed head: 871f7a932f780d4132884c5c74e3dda507f641fd
…le in the overview Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Weston Platter <westonplatter@gmail.com>
Summary
This PR continues the Tier 1 refactoring described in #329. It moves the skill-name length rule out of
quality_score.pyand intoquality-default.yaml/--quality-config, as the next Discoverability rule after #885.discoverability.name_too_shortmin_chars: 5The rule sets
points,messageandsuggestion, plus its one setting. Severity and the matching logic stay in code.Behavior:
points: 0turns the rule off and emits no finding.min_charsmust be a whole number from 1 to 1,000,000,000; booleans, floats and strings are rejected, as is an unknown key such asmin_char.Commits
feat(quality): Discoverabilityname_too_short.Changes in behavior compared to
mainmainquality_configdigestquality-default.yamlgained a rule.finding_idof the findingSkill name very short: 'ab') and the suggestion are byte-for-byte the same, so the ID is the same. The tests pin the IDs for a 2-character and a 4-character name, recorded frommainbefore the change. A custommessageorsuggestionchanges the ID, as for the other rules.The other Discoverability, Correctness and Efficiency rules stay in code for now.
Docs:
docs/tier1-reference.mdxdocuments the setting under Discoverability and notes that the kebab-case check is not configurable yet.Verification
tests/test_quality_config.pycovers the packaged values, the sparse overlay, and invalid content (not a mapping, unknown key,0, a float, a boolean, negative points).tests/validators/test_quality_score.pycovers the 4-versus-5-character boundary, a custom minimum in both directions, the folder name versus the frontmatter name, custom message and suggestion,points: 0, and the pinnedfinding_ids.ruff check: clean.ruff format --diffflags none of the lines this PR changes.ruff format --checkalready fails on other files onmain.make testormake build.fern check: 0 errorsRelease Impact
CHANGELOG.md🤖 Generated with Claude Code